package com.market.plus.core.mapping;

import org.springframework.stereotype.Component;

import com.googlecode.simpleobjectassembler.converter.AbstractObjectConverter;
import com.market.plus.core.domain.AlbumType;


@Component
public class AlbumTypeToIntegerConvert extends AbstractObjectConverter<AlbumType, Integer> {

   @Override
   public void convert(AlbumType sourceObject, Integer destinationObject) {
      destinationObject = Integer.valueOf(sourceObject.getAlbumType());
   }

   @Override
   public Integer createDestinationObject(AlbumType destinationObject) {
      return Integer.valueOf(destinationObject.getAlbumType());
   }

   @Override
   protected boolean disableAutoMapping() {
      return true;
   }
}
